#   加载源码
set(SRC_LIST1 dir1.cc)

# 构建库文件,默认是静态库，当然也能使用STATIC指定
add_library(dir1_library STATIC ${SRC_LIST1}) 

target_include_directories(dir1_library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})